home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / pbwndo.zip / PBMICE.INC < prev    next >
Text File  |  1991-09-01  |  4KB  |  116 lines

  1. ' PbMice.Inc
  2.  $IF 0
  3.  
  4.      This is the loader FOR PbMouse.Obj AND has the Declare's and Publics
  5.      necessary TO impliment this into you programs.
  6.  
  7.      (c) 1991 Barry Erick
  8.  
  9.  
  10.  $ENDIF
  11.  DEFINT a-z
  12.  DECLARE Function MouseInstalled()
  13.  DECLARE SUB InitMouse(INTEGER,INTEGER)
  14.  DECLARE SUB Mouse(INTEGER,INTEGER,INTEGER,INTEGER)
  15.  DECLARE SUB ShowMouse()
  16.  DECLARE SUB HideMouse()
  17.  DECLARE SUB GetMousePosAndButton(INTEGER,INTEGER,INTEGER)
  18.  DECLARE SUB SetMousePointerPos(INTEGER,INTEGER)
  19.  DECLARE SUB GetbuttonPress(INTEGER,INTEGER,INTEGER,INTEGER)
  20.  DECLARE SUB GetButtonRel(INTEGER,INTEGER,INTEGER,INTEGER)
  21.  DECLARE SUB SetLimits(INTEGER,INTEGER,INTEGER,INTEGER)
  22.  DECLARE SUB MakeGraphCursor(INTEGER,INTEGER,INTEGER)
  23.  DECLARE SUB SetTextPointerType(INTEGER,INTEGER,INTEGER,INTEGER)
  24.  DECLARE SUB RealMouseCounter(INTEGER,INTEGER)
  25.  DECLARE SUB SetMickeys(INTEGER,INTEGER)
  26.  DECLARE SUB SetExclusion(INTEGER,INTEGER,INTEGER,INTEGER)
  27.  DECLARE SUB SetDouble(INTEGER)
  28.  DECLARE SUB SetMouseSens(INTEGER,INTEGER,INTEGER)
  29.  DECLARE SUB GetMouseSens(INTEGER,INTEGER,INTEGER)
  30.  DECLARE SUB SetMouseIntRate(INTEGER)
  31.  DECLARE SUB MousePage(INTEGER)
  32.  DECLARE SUB DisableMouse(INTEGER,INTEGER,INTEGER)
  33.  DECLARE SUB EnableMouse()
  34.  DECLARE SUB ResetMouseDriver(INTEGER,INTEGER)
  35.  DECLARE SUB MouseLanguage(INTEGER,INTEGER)
  36.  DECLARE SUB GetMouseInfo(INTEGER,INTEGER)
  37.  DECLARE SUB ReadMouse()
  38.  DECLARE SUB SetMouseInterruptService(INTEGER)
  39.  DECLARE SUB ResetMouse()
  40.  DECLARE SUB MouseClock(Integer)
  41.  DECLARE SUB MouseExit()
  42.  DECLARE FUNCTION DoubleClick%(INTEGER,INTEGER,INTEGER,INTEGER)
  43.  DECLARE FUNCTION MouseClick%()
  44.  DECLARE FUNCTION LeftButtonDown%()
  45.  DECLARE FUNCTION RightButtonDown%()
  46.  
  47.  PUBLIC Cursor%    'Not used anywhere.. is declared external in obj code
  48.  PUBLIC Mice%      'Public variable in Obj.. 0=No Mouse, else mouse present
  49.  PUBLIC MiceButtons% 'ditto, 0 = no buttons!, else.. number of buttons
  50.  PUBLIC CrtMode%,CrtCols%,CrtRows%,CursorMode%
  51.  Mice% = 0
  52.  MiceButtons% = 0
  53.  SeeMouse% = 0   '0 means visible. but this will be set by init mouse
  54.  PUBLIC ZeroMouse%,TextMouse%,HercGraphMode%
  55.  PUBLIC MouseAreaX1%,MouseAreaX2%
  56.  PUBLIC MouseareaY1%,MouseAreaY2%
  57.  PUBLIC MouseTextWidth%, MouseTextHeight%
  58.  PUBLIC MouseClicked%
  59.  PUBLIC MaxCrtX%,MaxCrtY%
  60.  PUBLIC ClickMouseX%,ClickMouseY%,MouseButtons%,Mice%
  61.  PUBLIC MouseClickButton%,Mousey%,MouseX%
  62.  PUBLIC MouseBusy%
  63.  PUBLIC MaxMouseTextShape%
  64.  PUBLIC ClickLTime&
  65.  PUBLIC ClickRTime&
  66.  Public ClickCTime&
  67.  public MouseEventFlag%
  68.  Public MouseEventButtonStatus%
  69.  Public MouseEventX%
  70.  Public MouseEventY%
  71.  Public MouseEventYMickeys%
  72.  Public MouseEventXMickeys%
  73.  PUBLIC SeeMouse%
  74.  PUBLIC SetLimitx%,SetLimity%,SetLimitx1%,SetLimitY1%
  75.  
  76. SUB GetVideoMode
  77.  DEF SEG= &H40    'get various modes from the bios
  78.  CrtMode% = PEEK(&H49) 'standard video modes.. see any bios book.
  79.  CrtCols% = PeekI(&h4a)'number of columns in current mode
  80.  CrtRows% = PEEK(&H84) 'number of rows in current mode
  81.  CursorMode% = PeekI(&H60) 'size of cursor. start,ending lines in 2 bytes
  82.  DEF SEG
  83. END SUB
  84.  
  85.  maxCRTx% = 80           'default max crt columns
  86.  MaxCrtY% = 25           'default max crt rows (43 or 50 if ega graphics
  87.  MouseTextWidth% = 8          ' these are constants, but are made
  88.  MouseTextHeight% = 8         '  integers so they do not have to be
  89.  MouseLeftButton% = 1         '  declared again in the unit. Constants
  90.  MouseRightButton% = 2        '  are not global thru units
  91.  MouseCenterButton% = 4
  92.  MouseBothButtons% = 3
  93.  MaxMouseTextShape% = 0'initialized by the obj file
  94.  MaxMouseGraphShape% = 0'this is init by the obj file, also
  95.  MouseHooked% = 0       'this is used by the obj file, also
  96.  MouseBusy% = 0         ' as is this.
  97.  CALL GetVideoMode
  98.  Select Case CRTRows%
  99.     Case 24
  100.          EGA43% = %False
  101.          VGA50% = %False
  102.     Case 42
  103.          EGA43%=%True
  104.          VGA50%=%False
  105.     Case 49
  106.          EGA43%=%False
  107.          VGA50%=%True
  108.  End Select
  109.  IF EGA43% then MaxCRTY% = 43  'for ega 43 line modes
  110.  IF VGA50% then MaxCRTY% = 50  'for vga 50 line modes
  111.  ClickLTime& = 0       'this allows the time to be known when buttons hit
  112.  ClickCTime& = 0       'and is used by the obj file and the pbu
  113.  ClickRTime& = 0
  114.  $LINK "PbMiceUn.Pbu"
  115.  $LINK "PBMouse.obj"   'THIS CAN NOT BE THE LAST ITEM IN THE $INCLUDE
  116.